<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <link rel="stylesheet" href="./swiper-4.4.2/dist/css/swiper.css">
  <style>
    body {
      margin: 0;
    }
    .swiper1 {
      height: 300px;
    }
  </style>
</head>
<body>
  <div class="swiper-container swiper1">
    <div class="swiper-wrapper">
      <div class="swiper-slide">内容1</div>
      <div class="swiper-slide">内容2</div>
      <div class="swiper-slide">内容3</div>
      <div class="swiper-slide">内容4</div>
      <div class="swiper-slide">内容5</div>
    </div>
    <!--左箭头-->
    <div class="swiper-button-prev"></div>
    <!--右箭头-->
    <div class="swiper-button-next"></div>
    <!-- 分页器 -->
    <div class="swiper-pagination"></div>

    <!-- 滚动条 -->
    <div class="swiper-scrollbar"></div>
  </div>
  <!-- <div class="prev">上一页</div>
  <div class="next">下一页</div> -->
  <script src="./swiper-4.4.2/dist/js/swiper.js"></script>
  <script>
    new Swiper('.swiper1', {
      loop: true,
      autoplay: {
        disableOnInteraction: false
      },
      navigation: {
        nextEl: '.swiper-button-next',
        prevEl: '.swiper-button-prev'
        /* nextEl: '.next',
        prevEl: '.prev' */
      },
      pagination: {
        el: '.swiper-pagination',
        clickable: true
      },
      scrollbar: {
        el: '.swiper-scrollbar',
      },
    })
  </script>
</body>
</html>